package com.hualan.web;

import com.hualan.service.PingJiaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;

@RestController
@RequestMapping("/pingjia")
public class PingJiaController {
    @Autowired
    private PingJiaService pingJiaService;

    @RequestMapping("/my")
    Integer mypingjia(String content,Integer cid,Integer uid,Integer dengji){
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");

        return pingJiaService.mypingjia(content,dateFormat.format(new Date()),cid,uid,dengji);
    }
}
